home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v9n03.arc / SETUPF.BAT < prev    next >
DOS Batch File  |  1990-01-12  |  8KB  |  154 lines

  1. ECHO OFF
  2. ECHO ╔════════════════════════════════════════════════════════════╗
  3. ECHO ║ SETUPF - Toolkit install for floppy disk based system.     ║
  4. ECHO ╟────────────────────────────────────────────────────────────╢
  5. ECHO ║PCDATA TOOLKIT 1.0 Copyright (C) 1990 Ziff Communication Co.║
  6. ECHO ║                 PC Magazine ■ Wolfgang Stiller             ║
  7. ECHO ╚════════════════════════════════════════════════════════════╝
  8. IF "%1"=="" goto help
  9. IF %1==? goto help
  10. IF "%2"=="" goto help
  11. IF %2==? goto help
  12. IF %1==%2 goto Dupl
  13. CLS
  14. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  15. ECHO ║ This batch file is about to check the boot sector on disk %2. It will   ║
  16. ECHO ║ then copy files to the RECOVERY and the CHECK diskettes which will also ║
  17. ECHO ║ be inserted into drive %2.  **Use this only if you have no hard disk.** ║
  18. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  19. ECHO ║ %1 should be your current disk which has the PCDATA toolkit files.      ║
  20. ECHO ║ %2 should be the diskette which will be checked.  If this is not the    ║
  21. ECHO ║ case, please hit CNTL/BREAK to terminate this batch file.               ║
  22. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  23. PAUSE
  24. IF NOT EXIST CHKBOOT.COM GOTO BadDisk
  25. IF NOT EXIST CHKFILEC.COM GOTO BadDisk
  26. GOTO Start
  27. :Dupl
  28. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  29. ECHO ║ Sorry, you must specify a different disk drive for the RECOVERY diskette║
  30. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  31. ECHO ║ If you only have one diskette drive you may usually specify drive B:    ║
  32. ECHO ║ and DOS will treat it as if it were a 2nd drive allowing you to switch  ║
  33. ECHO ║ diskettes.                                                              ║
  34. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  35. ECHO  
  36. :Help
  37. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  38. ECHO ║ Syntax is:   SETUPF a: b:                                               ║
  39. ECHO ║   where a: is the current drive with the PCDATA toolkit files,and       ║
  40. ECHO ║         b: is the drive containing the diskette to be checked.          ║
  41. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  42. ECHO ║ SETUP F  Will check the boot sector of the floppy on disk b:.  You      ║
  43. ECHO ║ will be prompted to insert the RECOVERY diskette in drive b:.  The      ║
  44. ECHO ║ reload file plus needed toolkit files will be copied to it.             ║
  45. ECHO ║ You will also be prompted to insert the CHECK diskette.                 ║
  46. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  47. GOTO End
  48. :BadDisk
  49. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  50. ECHO ║ This batch file MUST be executed from the directory containing the      ║
  51. ECHO ║ PCDATA Toolkit files.  One or more of these files is missing!           ║
  52. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  53. ECHO ║ Please check your current directory and disk and try again.             ║
  54. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  55. GOTO END
  56. :BadChk
  57. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  58. ECHO ║ An unrecoverable error has occurred executing CHKboot. This is usually  ║
  59. ECHO ║ due to disk problems such as no space or write protect. Do you really   ║
  60. ECHO ║ have a second physical hard (fixed) disk?                               ║
  61. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  62. GOTO END
  63. :NoSYS
  64. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  65. ECHO ║ The CHECK diskette must have been formatted with a "FORMAT a:/S" so     ║
  66. ECHO ║ that a copy of the system is on it.  Please do a FORMAT and re-execute  ║
  67. ECHO ║ this batch file.                                                        ║
  68. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  69. GOTO END
  70. :Start
  71. %2
  72. %1CHKboot %1CHKBOOT.PRM /I
  73. IF ERRORLEVEL 64 GOTO BADchk
  74. COPY @@BOOT.SCT %1
  75. DEL @@*.SCT
  76. %1
  77. COPY SETUPSMF.CPY SCANMAX.BAT
  78. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  79. ECHO ║ The boot sector has been checked and the @@BOOT.SCT reload file has     ║
  80. ECHO ║ been created.                                                           ║
  81. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  82. ECHO ║ Please insert the recovery floppy into drive %2 now.                    ║
  83. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  84. PAUSE
  85. COPY CHKFILEC.COM %2
  86. COPY CFCOMPC.COM %2
  87. COPY CHKFILE.COM %2
  88. COPY CFCOMP.COM %2
  89. COPY CHKBOOT.COM %2
  90. COPY LODBOOT.COM %2
  91. COPY @@BOOT.SCT %2
  92. COPY *.PRM %2
  93. COPY MIRDIR.COM %2
  94. COPY XALL.COM %2
  95. COPY SCAN*.BAT %2
  96. COPY FASTRUN.BAT %2
  97. COPY DSP*.BAT %2
  98. COPY RELODB.BAT %2
  99. DEL *.SCT
  100. : Create special marker file so other batch files know about this one
  101. TYPE %2PCITKR.MRK >%2PCITKR.MRK
  102. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  103. ECHO ║ Your RECOVERY diskette has been built.  We are now checking the files   ║
  104. ECHO ║ written to it.  No files should be missing.  All toolkit files should   ║
  105. ECHO ║ match (This means all .COM and .BAT files).  If any files are deleted   ║
  106. ECHO ║ check that there is enough room on the diskette.  If any errors show up,║
  107. ECHO ║ please get a clean copy of the toolkit.                                 ║
  108. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  109. ECHO ║ Files: IBMBIO.COM, and IBMDOS.COM may have different names on some PCs. ║
  110. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  111. CHKfileC %2*.* ))INTRB.LOG/I:))
  112. CFcompC ))INTRF.LOG ))INTRB.LOG/P/O
  113. DEL ))INTRB.LOG
  114. ECHO   
  115. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  116. ECHO ║ We are now creating the CHECK diskette.  Please insert it in drive %2   ║
  117. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  118. PAUSE
  119. IF NOT EXIST %2COMMAND.COM GOTO NoSYS
  120. COPY CHKFILEC.COM %2
  121. COPY CFCOMPC.COM %2
  122. COPY CHKBOOT.COM %2
  123. COPY *.PRM %2
  124. COPY MIRDIR.COM %2
  125. COPY XALL.COM %2
  126. COPY SCANSYS.BAT %2
  127. COPY SCANDIR.BAT %2
  128. COPY SCANRFDR.BAT %2
  129. COPY SCANMAX.BAT %2
  130. COPY FASTRUN.BAT %2
  131. COPY DELFILES.BAT %2
  132. COPY INIT*.BAT %2
  133. COPY CH*.BAT %2
  134. COPY DSP*.BAT %2
  135. DEL *.PRM
  136. : Create special marker file so other batch files know about this one
  137. TYPE %2PCITKC.MRK >%2PCITKC.MRK
  138. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  139. ECHO ║ Your CHECK diskette has been built.  We are now checking the files      ║
  140. ECHO ║ written to it.  No files should be missing.  All toolkit files should   ║
  141. ECHO ║ match (This means all .COM and .BAT files).  If any files are deleted   ║
  142. ECHO ║ check that there is enough room on the diskette.  If any errors show up,║
  143. ECHO ║ please get a clean copy of the toolkit.                                 ║
  144. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  145. ECHO ║ Files: IBMBIO.COM, and IBMDOS.COM may have different names on some PCs. ║
  146. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  147. CHKfileC %2*.* ))INTCB.LOG/I:))
  148. CFcompC ))INTCF.LOG ))INTCB.LOG/P/O
  149. DEL ))INTCB.LOG
  150. ECHO ╔════════════════════╗
  151. ECHO ║ SETUP is complete! ║
  152. ECHO ╚════════════════════╝
  153. :End
  154.